-- Radical by Basil Voronkov
-- Module 'const'
---------------------------------------------
-- Contains useful constant for the game engine.

const = {}

const.path = {
  theme = "theme/",
  gfx = "gfx/",
  ui = "gfx/ui/",
  bonus = "gfx/bonus/",
  ico = "gfx/ico/",
  mus = "mus/",
  sfx = "sfx/",
  game = "game/",
  dlg = "dlg/"
}

--Generic drawing constants
const.font = "sans.ttf";
const.fontb = "sans-b.ttf";
const.fontem = "sans-em.ttf";
const.fonti = "sans-i.ttf";
const.fontsize = 12;

const.opacity = 150;
const.maskcolor = "black";
const.selcolor = "red";
const.textcolor = "#ADADAD";
const.linkcolor = "white";
const.activelinkcolor = "#FFCC66";
const.bordercolor = "#333333";

--Scene related constants
const.scenefont = const.font;
const.scenefontsize = 14;
const.winwidth = 960;
const.winheight = 600;
const.picwidth = const.winwidth;
const.picheight = 600;
const.blackbar = 0;
const.dscpad = 20;
const.textwidth = const.winwidth - const.dscpad*2;
const.dscframepadx = 11;
const.dscframepady = 4;
const.textframewidth = const.winwidth - const.dscframepadx*2;

--Hud
const.hudx = 880;
const.hudy = 30;

--Theme related
const.invx = 0--24;--910;
const.invy = 0;
const.menubuttonx = 0;--const.winwidth - 24;
const.menubuttony = 800;
const.menupad = 10;
const.textalign = "left";
const.cursor = "theme/cursor.png";
const.cursorx = 2;
const.cursory = 2;
const.clicksnd = "theme/click.wav";
const.menufontsize = 15;
const.menubutton = "theme/menu.png";

--Application of parameters
theme.set("menu.button.x", const.menubuttonx);
theme.set("menu.button.y", const.menubuttony);
theme.set("menu.col.bg", "white");
theme.set("menu.col.fg",  "gray");
theme.set("menu.col.link", "black");
theme.set("menu.col.alink", "gray");
theme.set("menu.col.alpha", 255);--const.opacity);
theme.set("menu.col.border", "gray");
theme.set("menu.bw", 2)
theme.set("menu.fnt.size", const.menufontsize);
theme.set("menu.fnt.height", "1.0");
theme.set("menu.gfx.button", const.menubutton);
theme.set("inv.x", const.invx);
theme.set("inv.y", const.invy);
theme.set("inv.w", 25);
theme.set("inv.h", 18);
theme.set("inv.mode", "horizontal-left");
theme.set("inv.up.x", -1);
theme.set("inv.up.y", -1);
theme.set("inv.down.x", -1);
theme.set("inv.down.y", -1);
theme.set("inv.col.link", const.textcolor);
theme.set("inv.col.alink", const.activelinkcolor);
theme.set("inv.fnt.size", const.fontsize);
theme.set("inv.fnt.height", 1.0);
theme.set("scr.gfx.scalable", 0);
theme.set("scr.gfx.bg", "theme/bg.png");
theme.set("scr.col.bg", "white");
theme.set("scr.gfx.pad", const.menupad);
theme.set("scr.gfx.mode", "float");

theme.set("scr.gfx.x", 0);--890);
theme.set("scr.gfx.y", 20);
theme.set("scr.gfx.w", const.picwidth);
theme.set("scr.gfx.h", const.picheight);

theme.set("win.align", const.textalign);
theme.set("win.x", 0);
theme.set("win.y", 800); --changed dynamically
theme.set("win.w", const.winwidth); --changed dynamically
theme.set("win.h", 100); --changed dynamically
theme.set("scr.gfx.cursor.x", const.cursorx);
theme.set("scr.gfx.cursor.y", const.cursory);
theme.set("scr.gfx.cursor.normal", const.cursor);
theme.set("win.fnt.size", const.scenefontsize);
theme.set("win.fnt.height", 1.0);
theme.set("win.col.fg", const.textcolor);
theme.set("win.col.link", const.linkcolor);
theme.set("win.col.alink", const.activelinkcolor);
theme.set("win.up.x", -1);
theme.set("win.up.y", -1);
theme.set("win.down.x", -1);
theme.set("win.down.y", -1);
theme.set("snd.click", const.clicksnd);
theme.set("win.gfx.up", "theme/aup.png");
theme.set("win.gfx.down", "theme/adown.png");